package jsen.tool.ddd.demo.domain.parking.factory;

import jsen.tool.ddd.demo.domain.parking.Car;
import jsen.tool.ddd.demo.domain.parking.ParkingRecord;
import jsen.tool.ddd.demo.domain.parking.ParkingStatus;

/**
 * @author jsen
 * @date 2021/10/6
 */
public class ParkingRecordFactory {
    public static ParkingRecord build(Car car) {
        return ParkingRecord.builder().recordId(1L).car(car)
                .parkingStatus(ParkingStatus.builder().status(1)
                        .startTime(System.currentTimeMillis()).endTime(System.currentTimeMillis()).build())
                .build();
    }
}
